<include file="common/hearder"/>

<div class="page-header">
    <div class="pull-left">
        <h4><span class="glyphicon glyphicon-tag"></span>审批类型管理\Recruitment management</h4>
    </div>
</div>
<div class="pull-right">
    <form action="{:U('index')}" method="post">
        <input type="text" name="tj" placeholder="输入‘标题’查询">
        <button type="submit"  class="btn btn-mystyle btn-sm"><span class="glyphicon glyphicon-search"></span>搜索</button>
    </form>
</div>
<div class="manage-left">
    <a href="{:U('add')}" class="btn btn-info glyphicon glyphicon-plus-sign">添加</a>
    <a onclick="confirm('确定删除数据？删除后可在回收站找回...')?$('#form_all').submit():'false';" class="btn btn-warning glyphicon glyphicon glyphicon-minus-sign">批量删除</a>
    <a href="{:U('Recycle_bin')}" class="btn btn-danger glyphicon glyphicon glyphicon-trash">回收站</a>
</div>
<div class="clearfix"></div>
<div class="table-margin">
    <form action="{:U('del_all')}" method="post" id="form_all">
        <table class="table table-bordered table-header">
            <thead>
            <tr>
                <td class="w5"><input class="ch_all" type="checkbox"></td>
                <td class="w5">ID</td>
                <td class="w10">名称</td>
                <td class="w10">状态</td>
                <td class="w25">操作</td>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="v">
                <tr>
                    <td><input name="artid[]" value="{$v.atrid}" type="checkbox" class="ch_id"></td>
                    <td>{$v.atrid}</td>
                    <td>{$v.atrnmae}</td>
                    <td>{$v['states'] == 1 ? '已启用':'<span style="color: red;">未启用</span>'}</td>
                    <td>
                        <a href="{:U('set',array('atrid'=>$v['atrid'],'page'=>1))}" class="btn btn-info btn-xs active" role="button"><span class="glyphicon glyphicon-zoom-in"></span>设计流程</a>
                        <a href="{:U('edit',array('atrid'=>$v['atrid']))}" class="btn btn-warning btn-xs active" role="button"><span class="glyphicon glyphicon-pencil"></span>编辑</a>
                        <a href="{:U('del',array('atrid'=>$v['atrid']))}" class="btn btn-danger btn-xs active" role="button" onclick="return confirm('确定删除数据？')"><span class="glyphicon glyphicon-trash"></span>删除</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
    </form>
    {$show}
</div>
</div>
<script>
    //全选  反选
    $('.ch_all').on('click',function () {
        if($(this).prop('checked')){
            $('.ch_id').each(function () {
                if($(this).prop('checked')){
                    $(this).prop('checked',false);
                }
                else {
                    $(this).prop('checked',true);
                }
            })
        }
        else {
            $('.ch_id').prop('checked',false);
        }
    });
</script>

<include file="common/footer"/>